﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="pub_info.aspx.vb" Inherits="prueba.WebForm5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="table1" style="width:100%;">
        <tr>
            <td>
                <asp:GridView ID="GridView2" runat="server" 
                    DataSourceID="pub_infoSqlDataSource1" AutoGenerateColumns="False" 
                    DataKeyNames="pub_id">
                    <Columns>
                        <asp:BoundField DataField="pub_id" HeaderText="pub_id" ReadOnly="True" 
                            SortExpression="pub_id" />
                        <asp:BoundField DataField="pr_info" HeaderText="pr_info" 
                            SortExpression="pr_info" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="pub_infoSqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:pubsConnectionString12 %>" 
                    DeleteCommand="DELETE FROM [pub_info] WHERE [pub_id] = @pub_id" 
                    InsertCommand="INSERT INTO [pub_info] ([pub_id], [logo], [pr_info]) VALUES (@pub_id, @logo, @pr_info)" 
                    SelectCommand="SELECT * FROM [pub_info]" 
                    UpdateCommand="UPDATE [pub_info] SET [logo] = @logo, [pr_info] = @pr_info WHERE [pub_id] = @pub_id">
                    <DeleteParameters>
                        <asp:Parameter Name="pub_id" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:ControlParameter ControlID="TxtBox1pub_id" Name="pub_id" 
                            PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="TxtBox2logo" Name="logo" PropertyName="Text" 
                            Type="Object" />
                        <asp:ControlParameter ControlID="TxtBox3pr_info" Name="pr_info" 
                            PropertyName="Text" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="logo" Type="Object" />
                        <asp:Parameter Name="pr_info" Type="String" />
                        <asp:Parameter Name="pub_id" Type="String" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label1" runat="server" Text="pub_id"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox1pub_id" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label2" runat="server" Text="logo"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox2logo" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label3" runat="server" Text="pr_info"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox3pr_info" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Button ID="Button1" runat="server" Text="Enviar" />
                    <asp:Button ID="Button2" runat="server" Text="BORRAR" />
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
